# Maintainer: Brandon Boese <brandonboese@protonmail.com>
pkgname=lomiri-gallery-app
pkgver=3.0.2
pkgrel=0
pkgdesc="Photo gallery for the Ubuntu Touch platform"
url="https://gitlab.com/ubports/development/apps/lomiri-gallery-app"
arch="all !armhf" # blocked by lomiri-ui-toolkit
license="GPL-3.0-only"
source="https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/archive/v$pkgver/lomiri-gallery-app-v$pkgver.tar.gz
	0001-update-for-newer-Exiv2-version.patch
	0002-disable-werror.patch"
depends="
	exiv2
	libmediainfo
	lomiri-thumbnailer
	lomiri-trust-store
	lomiri-ui-extras
	lomiri-ui-toolkit
	qqc2-suru-style
	qt5-qtmultimedia
	"
makedepends="
	click-dev
	cmake
	cmake-extras
	exiv2-dev
	libmediainfo-dev
	lomiri-trust-store-dev
	mesa-gles
	qt5-qtbase-dev
	qt5-qtbase-sqlite
	qt5-qtdeclarative-dev
	samurai
	"
checkdepends="
	py3-dbusmock
	py3-xdg
	xvfb-run
	"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # requires autopilot
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=OFF \
		-DCMAKE_BUILD_TYPE=None \
		-DCLICK_MODE=OFF \
		-DINSTALL_TESTS=OFF
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
408ab6883e82f9862e9eaa578652f48121707421bcd9672a7bcdc4412cb740a1f6077326badaadb79807de538dd5c31084706c9014fe3994c0725dfad7adb381  lomiri-gallery-app-v3.0.2.tar.gz
e5e0eecd9b6926ff2a8359ebd3a59b5189e939cd830d0378f7a2271401f51c320061df6700a3d7ff5f2b0de274db02e6c02a2b0974498255351e3be3e186e7d1  0001-update-for-newer-Exiv2-version.patch
01e020651ba57625476138cac716714843aceb2896bb49a3510a8adabed4579fc6c33871df5afb3a449a736c6d54b52cd23fa33aec8ca9110b1bbe908bf20461  0002-disable-werror.patch
"
